import request from '@/utils/request'

// 删除文件
export function deleteFile(fileName) {
  return request({
    url: '/minio/deleteFile/' + fileName,
    method: 'delete'
  })
}

// 获取文件预览地址
export function getPreviewUrl(objectName) {
  return request({
    url: '/minio/getPreviewUrl/' + objectName,
    method: 'get'
  })
}

// 下载文件
export function downloadFile(fileName) {
  return request({
    url: '/minio/downloadFile/' + fileName,
    method: 'get',
    responseType: 'blob'
  })
}
